<?php
/**
 * Template Name: Photo album
*/

global $theme; get_header(); ?>

    <div id="main">
    
        <?php $theme->hook('main_before'); ?>

        <div id="content">
            
            <?php $theme->hook('content_before'); global $theme;
            
            $urlSite = get_bloginfo('wpurl');
            $urlImage = $urlSite ."/wp-content/themes/Linedy/photos/";
            $photos = get_directory_list("wp-content/themes/Linedy/photos/");

            echo '<ul class="thumb">';
            foreach ($photos as $photo) {
                $srcImg = $urlImage . $photo;
                echo '<li><a href="' . $srcImg .'"><img src="'. $srcImg .'" /></a></li>';
            }
            echo "</ul>";
            
            $theme->hook('content_after'); ?>
            
            <script type='text/javascript'>
//<![CDATA[
$(document).ready(function(){

	//Larger thumbnail preview
	
	$('ul.thumb li').hover(function() {
            $(this).css({'z-index' : '8'});
            $(this).find('img').addClass('hover').stop()
            .animate({
            marginTop: '-100px',
            marginLeft: '-115px',
            top: '50%',
            left: '50%',
            width: '194px',
            height: '151px',
            padding: '20px'
	}, 200);
	
	} , function() {
            $(this).css({'z-index' : '0'});
            $(this).find('img').removeClass('hover').stop()
            .animate({
            marginTop: '0',
            marginLeft: '0',
            top: '0',
            left: '0',
            width: '149px',
            height: '116px',
            padding: '5px'
            }, 400);
	});
	$('.thumb a').lightBox();

});
//]]>
</script>
        </div><!-- #content -->
    
        <?php #get_sidebars(); ?>
        
        <?php $theme->hook('main_after'); ?>
        
    </div><!-- #main -->
    
<?php get_footer(); ?>
